<template>
  <el-table class="percent-table" :height="height" :data="data" border :cell-class-name="cellClassName" :show-summary="showSummary">
    <slot></slot>
  </el-table>
</template>

<script setup lang="ts">
const props = defineProps({
  data: {
    type: Array,
    default: () => [],
  },
  height: {
    type: [String, Number],
    default: null,
  },
  showSummary: {
    type: Boolean,
    default: false,
  },
});

const cellClassName = ({ row, column }) => {
  return `${row.职业} ${column.label}`
};
</script>

<style scoped></style>
